﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace FSC.HaNamAPApplication
{
    public partial class HNAP_AdminAPResult : System.Web.UI.UserControl
    {
        public string CurrentUrlWithoutParam
        {
            get
            {
                return Controler.UrlWithoutParam(Request.RawUrl);
            }
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //BindData(false);
            }

        }

        //private void BindData(bool isSearch)
        //{
        //    HaNamAPDataDataContext db = new HaNamAPDataDataContext();

        //    var data = from p in db.ProcessingAPs
        //               orderby p.ProcessingAP_ID descending
        //               select new
        //               {
        //                   p.ProcessingAP_ID,
        //                   p.AdminProcedure.Name,
        //                   p.PopularUser,
        //                   p.ReceivingOffice_ID,
        //                   p.ReceivingDate,
        //                   p.AppointmentResultDate,
        //                   p.FinalReturnDate,
        //                   p.ProcessStatus
        //               };
        //    if (isSearch)
        //    { 
        //        //
        //    }

        //    rptAPResult.DataSource = data;
        //    rptAPResult.DataBind();
        //}

        //protected string GetOfficeName(object iOfficeId)
        //{
        //    HaNamAPDataDataContext db = new HaNamAPDataDataContext();

        //    Office objOffice = db.Offices.SingleOrDefault(a => a.Office_ID == (int)iOfficeId);
         //   if (objOffice != null)
         //       return objOffice.Name;
         //   else
          //      return "";
        //}
    }
}